/*
 *  linmigrate - command line parser for linmigrate
 *
 *  Copyright (C) 2011 by Volodymyr M. Shcherbyna <volodymyr@shcherbyna.com>
 *
 *      This file is part of linmigrate.
 *
 *  linmigrate is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  linmigrate is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with linmigrate.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef CMDPARSER_H
#define CMDPARSER_H

#include <QMap>
#include <QString>
#include <QStringList>

#include "idistributionhandler.h"

///
#define CMD_PARSER_COMMAND_SZ_HELP                              "--help"

///
#define CMD_PARSER_COMMAND_SZ_EXPORT                            "--export"

///
#define CMD_PARSER_COMMAND_SZ_IMPORT                            "--import"

///
#define CMD_PARSER_COMMAND_SZ_EXPORT_OPTION_SYMLINK_EXCLUDE     "--exclude-symlinks"

///
#define CMD_PARSER_COMMAND_SZ_IMPORT_OPTION_PATH                "--import-file"

class CCmdParser : public QMap<QString, QString>
{
public:
    enum CmdParserCommand
    {
        CmdUnknown = 0x00,
        CmdHelp    = 0x01,
        CmdImport  = 0x02,
        CmdExport  = 0x03
    };
public:
    CCmdParser(const QStringList & arguments);
public:
    CmdParserCommand getCommand(void);
    ExportOptions getExportOptions(void);
    ImportOptions getImportOptions(void);
private:
    CmdParserCommand m_Command;
    const QStringList m_Arguments;
};

#endif // CMDPARSER_H
